WorldWindowController

abstract class WorldWindowController(wwd: WorldWindow) : AbstractWorldWindowController, GestureListener

This class provides a base window controller with required properties and methods which subclasses may inherit from to create custom window controllers for controlling the globe via user interaction.

Event listeners are plain (Event) -> Unit functions: Kotlin/Wasm cannot implement the external org.w3c.dom.events.EventListener, so the whole input pipeline uses function values instead.

Inheritors

Constructors

Link copied to clipboard
constructor(wwd: WorldWindow)

Properties

Link copied to clipboard
val fling: FlingAnimator

Inertial pan animator. Each platform's createFlingScheduler supplies the per-frame clock. The per-frame action dispatches by projection: 2D uses incremental projected-meters math, 3D uses great-circle radians. Picking the right one matters because Mercator metersPerPixel diverges from the 3D radians-on-a-sphere formula away from the equator.

Link copied to clipboard
val pivotAnchor: PivotAnchorState

Shared anchor for pinch / rotate / wheel handlers. Lazy because engine may not be initialized yet at controller-construction time.

Link copied to clipboard
val velocitySampler: ReleaseVelocitySampler

Trailing-window velocity tracker used to seed fling on gesture release.

Functions

Link copied to clipboard
abstract fun gestureStateChanged(recognizer: GestureRecognizer)
Link copied to clipboard
open fun handleEvent(event: Event)
Link copied to clipboard
open fun release()

Releases any platform resources held by the controller (timers, frame callbacks). Subclasses should override and call super.release() to add their own cleanup (e.g. VC repeat timers).